#include <iostream>
#include <cstdio>
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){
	while(b!=0){
		ll r=a%b;
		a=b;
		b=r;
	}
	return a;
}
int main(){
	long long a,b;
	cin>>a>>b;
	if(gcd(a,b)==1){
		cout<<"No";
	}else{
		if(a%(b/gcd(a,b))==0){
			cout<<"Yes";
		}else{
			cout<<"No";
		}
	}
	return 0;
}
